package com.eattravel.mapper;

import com.eattravel.pojo.Commodity;
import com.eattravel.pojo.Store;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface StoreCollectionMapper {
    //根据用户id查询他所收藏的商家
    List<Store> selectAllStoreCollection(String userId);
    //取消商家的收藏
    int cancleStoreCollection(String userId,String storeId);
    //2.向收藏中添加商家
    int addToColl(@Param("userId")String userId, @Param("storeId")String storeId);
    //1.先查询收藏中有没有这个商家 根据用户的id和商家id
    int selectSimpleCollShop(String userId,String storeId);
}